﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace MMOArpgServer.Tool
{
 public  class ReadConfigFiles
    {
        public static string GetFilesContent() {
            string content="";
            try
            {
                FileStream configFS = File.OpenRead(Directory.GetCurrentDirectory() + 
                    "\\ServerConfig.txt");
                if (configFS.CanRead) {
                    byte[] readBuffer = new byte[configFS.Length];
                    configFS.Read(readBuffer, 0, (int) configFS.Length);
                    content = Encoding.UTF8.GetString(readBuffer);
                }

            }
            catch (Exception e) {
                Console.WriteLine(e.Message);
            }
            return content;
        }
    }
}
